<script setup lang="ts">
import { onMounted, ref } from 'vue';
import { getCurrentInstance } from '@tarojs/taro';
let iframeUrl = ref();
/**
 * @description 当前路由信息
 */
const params = getCurrentInstance().router?.params as {
  url: string;
};

onMounted(() => {
  //使用微软的office online
  let url = 'http://view.xdocin.com/xdoc?_xdoc=' + params.url;
  iframeUrl.value = url;
});
</script>

<template>
  <iframe :src="iframeUrl" frameborder="0" width="100%" height="100%"></iframe>
</template>

<style lang="scss"></style>
